home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
misc1
/
amistuff.zip
/
FONT.INF
< prev
next >
Wrap
Text File
|
1991-01-20
|
11KB
|
187 lines
How Ami And Ami Pro Select Fonts
Because there are so many parameters in the Windows font selection
system, you have to understand Ami's and Ami Pro's font selection
algorithm to predict exactly how it will behave in a given
situation. So here's how the three steps of font selection go:
The User Chooses A Font
Ami and Ami Pro present the user with a list of face names the
printer driver claims to support. The only faces omitted from the
list are those in Windows character set 37, which are the Ami and
Ami Pro symbol fonts (there are four). Some printer drivers, like
most dot matrix drivers, support the Windows screen fonts as well
as fonts the printer has built-in; others, like the LaserJet and
Postscript drivers, support only printer-specific fonts.
Ami 1.0 allowed the user to choose only from the ANSI fonts,
intending to standardize on their use. However, many users wanted
access to the Windows vector fonts Roman, Script and Modern, which
are in the OEM character set. Ami Pro 1.1A added access to the
OEM character set. But then the LaserJet driver added some
support for a third character set. To put these problems to rest,
1.1B took the all-inclusive approach.
Once the face name is picked, Ami and Ami Pro try to establish
what point sizes are available. Some printers can scale their
fonts to any size, i.e. Postscript. When the printer driver
indicates that it can scale fonts, Ami and Ami Pro put a standard
list of point sizes in the list box (6, 8, 10, 12, 18, 24, 36, 48)
and also enable the edit box so the user can type any point size
he needs.
Other printers can scale some of their fonts but not others. The
only known case of this so far is the Canon LBP8 III. Ami
Professional can deal with this too. In general, if the printer
cannot scale fonts, but an individual font reports that it is a
"scale-able" vector font, Professional allows any point size to be
entered.
The third class of printers is the one which cannot scale its
fonts, like the LaserJet and dot matrix printers. Here the
printer driver reports exactly what fonts are available and in
what point sizes. Ami and Ami Pro offer only those sizes as
alternatives.
In the Modify Style dialog box, Ami and Ami Pro go one step
further and actually only allow bold or italic or underline to be
chosen if the printer can supply that enhancement. For example,
one LaserJet cartridge has Helv 14-point in bold only. When you
choose Helv 14 in the Modify Style box, Ami and Ami Pro
automatically check the bold box and grey out the normal box. In
the Text menus, however, Ami and Ami Pro don't make this extra
check.
Dot matrix printers generally support the Windows GDI (Graphics
Display Interface) fonts. These are the Tms Rmn, Helv, and
Courier fonts that are intended for the screen, along with any
other screen fonts the user may have added to his WIN.INI file.
The theory with GDI fonts is that GDI can scale them up (larger)
by integral factors from 2X to 8X, and wider by integral factors
from 2X to 5X if necessary. So any one screen font is available
on the printer in eight heights. In the case of Tms Rmn, where
Windows supplies 6 sizes, and Ami and Ami Pro supply another 6,
that leaves (6 + 6) X 8 = 96 size choices.
What complicates these choices is that, first of all, some of
those sizes are the same -- that is, 8-point tripled is the same
as 12-point doubled. The second and more troublesome complication
is that when GDI scales a font up, the total size of the result
cannot be more than 64K. Because Ami and Ami Pro can not know the
size (in bits) of a font, they can not know when to eliminate
these choices. The effect is that a user may pick a 96-point font
but get something only 48 points high. Ami Pro limits the extent
of the problem by never listing any font choice over 100 points.
Ami And Ami Pro Ask The Printer For That Font
Once the user has asked for a font, it is presumably available on
the printer. Of course if he changes the printer, the fonts sizes
and faces requested may no longer be available.
Regardless of how the font is specified, through a style sheet or
through the Text menu or from the drawing module, Ami and Ami Pro
attempt to print or display it by asking Windows for the closest
font available on the printer. If printing, Ami and Ami Pro
simply output the text and the printer uses that font. The
spacing between words and between letters in a word is left just
as the printer normally does it, except in two cases: when a
paragraph is marked justified, Ami and Ami Pro tell the printer
driver to add extra space between the words to make both margins
flush; and when a paragraph style specifies loose or tight line
tightness, the software asks the printer driver to tighten or
loosen the inter-character spacing. The actual amount of
tightening or loosening is the same on each character, and is
equal to the percentage given in the dialog box (90% or 115%)
times the average character width of the font.
If Ami and Ami Pro are displaying a document on the screen (in
layout mode), they don't directly use that font, but instead make
calls to the printer driver to find out how tall the font is and
how wide the characters are. This information is then used to
wrap the text, and it is also used to select a corresponding
screen font.
Then Ami and Ami Pro Get A Suitable Screen Font
The trickiest part of the font selection in Ami and Ami Pro is in
selecting a screen font, given the printer font's characteristics.
Remember, to display a font, first Ami and Ami Pro ask the
printer driver for its closest match to the requested font; and
then the characteristics of the printer font are fed back to the
screen driver to find the closest match. The selection happens in
several steps; how many steps it takes depends on how close a
match is available for the printer font. Here are the steps:
1.
First Ami and Ami Pro take the characteristics of the printer
font, including its name, point size, average width, character
set, and attributes (bold, italic, underline, etc.), and ask the
Windows font mapper to get as close to that as possible for the
screen font. For Ami and Ami Pro to be happy with that choice,
the font has to be no more than 7% taller (Ami Pro) than the font
on the printer (10% in Ami 1.0). Windows may have returned a
taller font if it thought that other considerations made it the
right choice.
2.
If Ami (or Ami Pro) is not happy with the first font, it makes a
broader request to Windows, with the same characteristics as
before, except it will settle for any type face in the same class
(serif or no, proportional or no). In either case, what Windows
comes up with must pass the test that the average character width
be no more than 7% wider than the printer font we're trying to
match (10% in Ami 1.0). The reason for this test is that when a
screen font is too wide, Ami and Ami Pro display WYSIWYG line
endings and lose all the space between the words. This doesn't
always solve the problem, however.
3.
If the above two steps don't produce a screen font Ami and Ami Pro
can use, the software starts reducing the point size it asks for
by 1 and asks again. The fonts that this process returns have to
pass the 7% (Ami Pro) and 10% (Ami 1.0) width test. Eventually,
the software finds a smaller screen font it's happy with, or if
not, it decides to greek the font. Greeking is done using the
height and width of the text as the printer driver reports it.
At any point along this path, Windows can give back a totally
incorrect screen font by deciding, for example, that it has an
italic font that's just perfect, even if we didn't ask for an
italic font. This is why, in rare cases, you see italics even if
you didn't ask for it, and don't get it on the printer.
All of this screen font selection goes through the view scaling
logic, since naturally to show a 12-point font in enlarged view
takes a different screen font than to show it in working view.
When screen font manufacturers provide a certain point size, that
point size is for our standard view. How well that screen font
fares in other views is not, in general, tested by those third
parties. Working view causes the most troubles. We chose 91% as
the default because that usually requires exactly one point size
smaller on the screen.
To display a line on the screen, Ami (and Ami Pro) takes the
screen font it has laboriously extracted, and finds out how long
the line would be using that font. To display the font, Ami (and
Ami Pro) instructs Windows to compensate for the difference
between natural printer length and the natural screen width by
squeezing or stretching the space between words. This leaves the
intercharacter spacing constant for better legibility. Windows
will not, however, squeeze the words over top of each other, and
Ami and Ami Pro don't get told when the amount of squeezing it has
requested would result in that. So when the screen font selection
has not been entirely successful, and all the spaces between words
disappear, the software cannot place the cursor in the right
place, and editing becomes very difficult. In these cases, it is
advantageous to use draft mode for editing.
When using a fixed pitch font, Ami and Ami Pro will occasionally
tighten the intercharacter spacing of the screen font so that
columns line up a little better. This is only a secondary effect,
though, and should only be obvious in unusual cases.
December 11, 1989